package com.ycy.dubbo.impl;

import com.ycy.dubbo.client.ThreadService;
import org.apache.dubbo.config.annotation.DubboService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@DubboService(version = "1.1.0")
public class ThreadServiceImpl implements ThreadService {

  Logger logger = LoggerFactory.getLogger(ThreadServiceImpl.class);

  @Override
  public String getThreadName() {
    logger.info("getThreadName");
    try {
      Thread.sleep(500);
    } catch (InterruptedException e) {
      e.printStackTrace();
    }
    return Thread.currentThread().getName();
  }

}
